<template>
	<Grid>
		<template #toolbar-actions>
			<el-radio-group v-model="search.type" text-color="#fff" fill="#008000">
				<el-radio-button label="航行" :value="0" />
				<el-radio-button label="系泊" :value="1" />:
			</el-radio-group>
		</template>
	</Grid>
</template>
<script lang="ts" setup>
	import type { VxeGridListeners, VxeGridProps } from '#/adapter/vxe-table';
	import { useVbenVxeGrid } from '#/adapter/vxe-table';
	const search = reactive({
		type: 0,
	})
	interface RowType {
		address : string;
		age : number;
		id : number;
		name : string;
		nickname : string;
		role : string;
	}
	const gridOptions : VxeGridProps<RowType> = {
		columns: [
			{ title: '序号', type: 'seq', width: 50 },
			{ field: 'name', title: '层' },
			{ field: 'age', sortable: true, title: '合计' }
		],
		data: [],
		pagerConfig: {
			enabled: false,
		},
		sortConfig: {
			multiple: true,
		},
	};

	const gridEvents : VxeGridListeners<RowType> = {
		cellClick: ({ row }) => {
			message.info(`cell-click: ${row.name}`);
		},
	};

	const [Grid, gridApi] = useVbenVxeGrid({ gridEvents, gridOptions });

	
</script>